package com.mianyang.zhangsan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mianyang.zhangsan.model.dto.SecGroupBankId;
import com.mianyang.zhangsan.model.entity.SecPaperBank;
import com.mianyang.zhangsan.model.entity.SecPaperBankGroup;
import com.mianyang.zhangsan.service.SecPaperBankService;
import com.mianyang.zhangsan.mapper.SecPaperBankMapper;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
* @author jiangjr
*/
@Service
public class SecPaperBankServiceImpl extends ServiceImpl<SecPaperBankMapper, SecPaperBank>
    implements SecPaperBankService{

    @Override
    public List<SecPaperBank> selectByPaperId(Long paperId) {
        QueryWrapper<SecPaperBank> wrapper = new QueryWrapper<>();
        if (paperId != null) {
            wrapper.eq("paper_id", paperId);
            return list(wrapper);
        }
        return null;
    }

    @Override
    public List<SecPaperBankGroup> selectDataGroupBy(String column) {
        return getBaseMapper().selectPaperBankGroupBy(column);
    }
}




